package cn.iocoder.yudao.module.ad.plan.vo;

import cn.iocoder.yudao.framework.business.basic.pojo.dto.SaveDTO;
import cn.iocoder.yudao.framework.validation.ImageUrl;
import cn.iocoder.yudao.framework.validation.LandingUrl;
import cn.iocoder.yudao.framework.validation.VideoUrl;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import lombok.Data;

@Tag(name = "广告投放计划新增/修改 Request VO")
@Data
public class AdPlanSaveDTO extends SaveDTO {

    @Schema(description = "视频地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://example.com/video.mp4")
    @NotBlank(message = "广告视频不能为空")
    @VideoUrl
    private String videoUrl;

    @Schema(description = "封面地址，后期自动从视频中提取关键帧作为封面图", example = "https://example.com/conver.jpg")
    @ImageUrl
    private String imageUrl;

    @Schema(description = "落地页地址", example = "https://example.com/landing.html")
    @LandingUrl
    private String landingUrl;

    @Schema(description = "预算金额，单位为分", requiredMode = Schema.RequiredMode.REQUIRED, example = "10000")
    @Positive
    private Integer budgetPrice;

    @Schema(description = "投放时长，单位为秒", requiredMode = Schema.RequiredMode.REQUIRED, example = "28800")
    @NotNull(message = "投放时长不能为空")
    @Positive
    private Integer exceptDuration;

}
